<template>
  <div class="h5-wrapper">
    <div class="header">搜索栏</div>
    <div class="content">
      <keep-alive> <router-view></router-view></keep-alive>
    </div>
    <nav class="tabbar">
      <router-link to="/index">首页</router-link>
      <router-link to="/find">找房</router-link>
      <router-link to="/consult">资讯</router-link>
      <router-link to="/my">我的</router-link>
    </nav>
  </div>
</template>

<script>
export default {
  name: 'Layout',
}
</script>

<style>
body {
  margin: 0;
  padding: 0;
}
</style>
<style lang="less" scoped>
.h5-wrapper {
  .header {
    width: 100%;
    height: 50px;
    background-color: lightpink;
    text-align: center;

    position: fixed;
    margin-top: -50px;
  }
  .content {
    margin-bottom: 51px;
    margin-top: 50px;
  }
  .tabbar {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 50px;
    line-height: 50px;
    text-align: center;
    display: flex;
    background: lightcoral;
    border-top: 1px solid hotpink;
    a {
      flex: 1;
      text-decoration: none;
      font-size: 14px;
      color: #333;
      -webkit-tap-highlight-color: transparent;
      &.router-link-active {
        color: #fff;
      }
    }
  }
}
</style>
